//
//  PlayerManager.h
//  MusicPlayer-two
//
//  Created by lanou3g on 15/8/22.
//  Copyright (c) 2015年 大展宏图. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "MusicInfo.h"

typedef enum : NSUInteger {
    PlayModeByLoop = 0,
    PlayModeByRandom = 1,
    PlayModeBySingle = 2,
} playMode;
@protocol PlayerManagerDelegate <NSObject>

- (void)musicPlayingWithCurrentSeconds:(NSInteger )seconds;

- (void)didCutMusicComplete;

@end


@interface PlayerManager : NSObject

@property (nonatomic,strong) NSMutableArray *playlist ;
@property (nonatomic, strong) MusicInfo *currentMusic;
@property (nonatomic, weak) id< PlayerManagerDelegate > delegate;
@property (nonatomic, assign)playMode playMode;


- (void)getPlayerlistComplete:(void(^)())complete;

+ (instancetype)defaultManager;

- (void)parpreNextMuesicWihtIndex:(NSInteger )index;
- (void)musicPlay;
- (void)musicPause;

/**
 *  关联音量
 */
- (void)musciChangeWithValumn:(float )valumn ;

/**
 *  用Slider控制时间
 */
- (void)setToTimeByValue:(NSInteger )value;

- (void)playNextMusic;
- (void)playLastMusic;
@end
